import 'package:flutter/material.dart';
import 'package:wanchong/widget/app_bar.dart';

import '../../path.dart';

class AddLoc extends StatefulWidget {
  @override
  _UserInfoState createState() => _UserInfoState();
}

class _UserInfoState extends State<AddLoc> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: MyAppBar(
            child: Align(
          //alignment: Alignment.center,
          child: Container(
            padding: EdgeInsets.only(left: 10.0, right: 10.0),
            child: Stack(
              children: <Widget>[
                GestureDetector(
                  onTap: () {
                    Navigator.pop(context);
                  },
                  child: new Align(
                    alignment: FractionalOffset.centerLeft,
                    child: Container(
                      padding: EdgeInsets.only(right: 15.0),
                      color: Colors.transparent,
                      height: double.infinity,
                      child: Image.asset("assets/login/top_return_icon.png"),
                    ),
                  ),
                ),
                new Align(
                  alignment: FractionalOffset.center,
                  child: new Text(
                    '收货地址',
                    style: new TextStyle(
                      color: Color(0xFF3C4450),
                      fontSize: 15.0,
                      fontWeight: FontWeight.w700,
                    ),
                  ),
                ),
                new Align(
                  alignment: FractionalOffset.centerRight,
                  child: new Text(
                    '添加地址',
                    style: new TextStyle(
                      color: Color(0xFF3C4450),
                      fontSize: 15.0,
                    ),
                  ),
                ),
              ],
            ),
          ),
        )),
        body: Container(
          child: Container(
            padding: EdgeInsets.only(left: 15.0, right: 10.0),
            child: Column(children: <Widget>[
              ClipRRect(
                borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(5),
                  topRight: Radius.circular(5),
                  bottomLeft: Radius.circular(5),
                  bottomRight: Radius.circular(5),
                ),
                child: Container(
                  height: 85,
                  margin: EdgeInsets.only(top: 15.0),
                  color: Color(0xFFFFFFFF),
                  child: Row(
                    children: <Widget>[
                      Container( 
                        width: 15,
                      ),
                      Expanded(
                        child: Container(
                          child: Column(
                            children: <Widget>[
                              Column(
                                children: <Widget>[
                                  Container(
                                    height: 40,
                                    child: Row(
                                      children: <Widget>[
                                        Text(
                                          '艾蒙',
                                          textAlign: TextAlign.center,
                                          style: new TextStyle(
                                            fontSize: 17,
                                            fontWeight: FontWeight.w700,
                                          ),
                                        ),
                                        Text(
                                          '158 **** 3777',
                                          textAlign: TextAlign.center,
                                          style: new TextStyle(
                                            fontSize: 12,
                                            color: Color(0xFF647280),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                  Container(
                                    child: new Text(
                                      '四川省成都市双流区中和镇观东二街59号附近中德英伦联邦A区',
                                      textAlign: TextAlign.left,
                                      softWrap: true,
                                      style: new TextStyle(
                                        fontSize: 12,
                                        color: Color(0xFF647280),
                                      ),
                                    ),
                                  ),
                                ],
                              ),
                            ],
                          ),
                        ),
                      ),
                      Container(
                        width: 15,
                      ),
                      GestureDetector(
                        onTap: () {
                          _tomodify();
                        },
                        child: Container(
                          color: Colors.white,
                          width: 56.0,
                          child: Row(
                            children: <Widget>[
                              Container(
                                width: 1,
                                height: 55,
                                color: Color(0x5eDBDBDB),
                              ),
                              Container(
                                width: 55,
                                height: 55,
                                child: Align(
                                  alignment: FractionalOffset.center,
                                  child: Text(
                                    '编辑',
                                    textAlign: TextAlign.center,
                                    style: new TextStyle(
                                      fontSize: 12,
                                      color: Color(0xFF647280),
                                    ),
                                  ),
                                ),
                              ),
                            ],
                          ),
                        ),
                      ),
                    ],
                  ),
                ),
              ),
            ]),
          ),
        ));
  }

  _tomodify() {
    Navigator.of(context).pushNamed(ModifylocPath);
  }
}
